#pragma warning(disable:4996)
#include<stdio.h>
#include<string.h>
void Reverse(char arr[], int start,int end)
{
	for (; start < end; start++, end--)
	{
		char tmp = arr[start];
		arr[start] = arr[end];
		arr[end] = tmp;
	}
	return;
}
int main()
{
	char arr[] = "ABCDE";
	int times,longs;
	scanf("%d", &times);
	int sz = strlen(arr);
	longs = times % sz;
	Reverse(arr,0,longs-1);
	Reverse(arr, longs, sz - 1);
	Reverse(arr,0,sz-1);
	printf("%s", arr);
	return 0;
}